home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 09 - 1993 / 09.07 Jul 93 / Bedrock Header Files / Support Includes / BRVM.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-19  |  6.5 KB  |  172 lines  |  [TEXT/MPS ]

  1. #ifndef BRVM_H
  2. #define BRVM_H
  3. /*========================================================================================
  4. /
  5. /     File:                BRVM.h
  6. /     Release Version:    $ 1.0d1 $
  7. /
  8. /     Creation Date:    3/3/90
  9. /
  10. /     COPYRIGHT 1990-93 SYMANTEC CORPORATION. ALL RIGHTS RESERVED. UNPUBLISHED -- RIGHTS
  11. /     RESERVED UNDER THE COPYRIGHT LAWS OF THE UNITED STATES. USE OF COPYRIGHT NOTICE IS
  12. /     PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION OR DISCLOSURE.
  13. /
  14. /     THIS SOFTWARE CONTAINS PROPRIETARY AND CONFIDENTIAL INFORMATION OF SYMANTEC
  15. /     CORPORATION. USE, DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT THE PRIOR
  16. /     EXPRESS WRITTEN PERMISSION OF SYMANTEC CORPORATION.
  17. /
  18. /     RESTRICTED RIGHTS LEGEND
  19. /     Use, duplication, or disclosure by the Government is subject to restrictions as Set
  20. /     forth in subparagraph (c)(l)(ii) of the Rights in Technical Data and Computer
  21. /     Software clause at DFARS 252.227-7013. Symantec Corporation, 10201 Torre Avenue,
  22. /     Cupertino, CA 95014.
  23. /
  24. /=======================================================================================*/
  25.  
  26. #ifndef BRSUPDEF_H
  27. #include "BRSupDef.h"
  28. #endif
  29.  
  30. #ifdef __cplusplus
  31.   extern "C" {
  32. #endif
  33.  
  34. #define BEDVM_RESTYPE   741
  35. #define BEDVM_RESCODE   147
  36.  
  37. typedef unsigned short BR_VMVersion;
  38.  
  39.  
  40. typedef enum
  41.  {
  42.    BR_VMError_kNoMemoryError,
  43.    BR_VMError_kRealModeMemoryError,
  44.    BR_VMError_kReallocateFailedMemoryError,
  45.    BR_VMError_kAllocationTooLargeMemoryError,
  46.    BR_VMError_kBlockTooBigMemoryError,
  47.    BR_VMError_kOutOfMemoryError,
  48.    BR_VMError_kLockMemoryError,
  49.    BR_VMError_kBadBucketMemoryError,
  50.    BR_VMError_kZeroLengthAllocationMemoryError,
  51.    BR_VMError_kBadHandleMemoryError,
  52.    BR_VMError_kNullPointerMemoryError,
  53.    BEDVMU_BADPOINTER
  54. } BR_VMError;
  55.  
  56. #ifdef BR_BUILD_WIN
  57.  
  58. typedef enum
  59. {
  60.     kFixedMemory         = LMEM_FIXED,
  61.     kMoveableMemory     = LMEM_MOVEABLE,
  62.     kDiscardableMemory     = LMEM_DISCARDABLE,
  63.     kNoCompactMemory      = LMEM_NOCOMPACT,
  64.     kNoDiscardMemory     = LMEM_NODISCARD,
  65.     kZeroInitMemory        = LMEM_ZEROINIT,
  66.     kDiscardedMemory    = LMEM_DISCARDED,
  67.     kModifyMemory        = LMEM_MODIFY,
  68.     kLockCountMemory     = LMEM_LOCKCOUNT
  69. } BR_VMMemoryFlags;
  70.  
  71. #define BR_VMFlags_kFixedMemory              LMEM_FIXED
  72. #define BR_VMFlags_kMoveableMemory           LMEM_MOVEABLE
  73. #define BR_VMFlags_kDiscardableMemory        LMEM_DISCARDABLE
  74. #define BR_VMFlags_kNoCompactMemory          LMEM_NOCOMPACT
  75. #define BR_VMFlags_kNoDiscardMemory          LMEM_NODISCARD
  76. #define BR_VMFlags_kZeroInitMemory           LMEM_ZEROINIT
  77. #define BR_VMFlags_kDiscardedMemory          LMEM_DISCARDED
  78. #define BR_VMFlags_kModifyMemory             LMEM_MODIFY
  79. #define BR_VMFlags_kLockCountMemory          LMEM_LOCKCOUNT
  80.  
  81. #endif
  82.  
  83. /* Virtual Memory Manager Procedures */
  84. BR_EXPORTENTRY(BR_VMVersion)  BR_VMGetVersion(void);
  85. BR_EXPORTENTRY(BR_Boolean) BR_VMRegister(unsigned short count, 
  86.                                         unsigned short FAR * pSizes);
  87. BR_EXPORTENTRY(BR_Boolean) BR_VMTerminate(void);
  88. BR_EXPORTENTRY(void) BR_VMInitialize (void);
  89.  
  90.  
  91. BR_EXPORTENTRY(BR_VMHandle) BR_VMAllocate(unsigned long request);
  92. BR_EXPORTENTRY(void FAR *)  BR_VMNonRelocatableAllocate(unsigned long request);
  93. /* This procedure is currently commented out for future modification - RAB
  94.  BR_EXPORTENTRY(BR_VMHandle) BR_VMFullAllocate(PBEDVMBUCKET fBucket,
  95.                                             WORD wFlags,
  96.                                             unsigned short request);
  97. */
  98.  
  99. BR_EXPORTENTRY(BR_Boolean) BR_VMFree(BR_VMHandle h);
  100. BR_EXPORTENTRY(BR_Boolean) BR_VMNonRelocatableFree (void FAR * p);
  101.  
  102. BR_EXPORTENTRY(LPVOID) BR_VMNonRelocatableResizeMove (void FAR * p, unsigned long request);
  103. BR_EXPORTENTRY(BR_VMHandle) BR_VMResize(BR_VMHandle h, unsigned long request);
  104. BR_EXPORTENTRY(BR_VMHandle) BR_VMFullReallocate(BR_VMHandle h, 
  105.                                                 unsigned long request, 
  106.                                              unsigned short wFlags);
  107.  
  108. /* This procedure is currently commented out for future modification - RAB
  109.   BR_EXPORTENTRY(BEDVMERR) BR_VMNonRelocatableResize (void FAR * p, long newRequest);
  110. */
  111.  
  112. /* This procedure is currently commented out for future modification - RAB
  113.   BR_EXPORTENTRY(PVOID) BR_VMExtendedLock (BR_VMHandle h, long pos, long len);
  114.   BR_EXPORTENTRY(VOID) BR_VMClearLocks(BR_VMHandle h);
  115. */
  116. BR_EXPORTENTRY(BR_Boolean) BedVMUnlock(BR_VMHandle h);
  117. BR_EXPORTENTRY(LPVOID) BR_VMLock(BR_VMHandle h);
  118.  
  119.  
  120. BR_EXPORTENTRY(unsigned long) BR_VMNonRelocatableGetSize(void FAR * p);
  121. BR_EXPORTENTRY(BR_Boolean) BR_VMIsFixedSize (void FAR * p);
  122. BR_EXPORTENTRY(BR_VMHandle) BR_VMGetHandle(void FAR * p);
  123. BR_EXPORTENTRY(unsigned short) BR_VMGetFlags(BR_VMHandle h);
  124. BR_EXPORTENTRY(unsigned long) BR_VMGetSize(BR_VMHandle h);
  125.  
  126. /* This procedure is currently commented out for future modification - RAB
  127.   BR_EXPORTENTRY(long) BedVMBucketSetFreestoreThreshold(PBEDVMBUCKET fBucket,
  128.        long lNewThreshold);
  129. */
  130.  
  131. BR_EXPORTENTRY(BR_VMError) BR_VMGetError(void);
  132.  
  133. BR_EXPORTENTRY(void FAR *) BR_VMClearMemory (void FAR * p, long len);
  134.  
  135. /* OS Handle Functions */
  136.  
  137.  
  138. BR_EXPORTENTRY(BR_PlatformHandle) BR_VMOperatingSystemAllocate(unsigned long request);
  139. BR_EXPORTENTRY(BR_Boolean) BR_VMOperatingSystemFree(BR_PlatformHandle h);
  140. BR_EXPORTENTRY(BR_PlatformHandle) BR_VMOperatingSystemResize(BR_PlatformHandle h, 
  141.                                                    unsigned long request);
  142. BR_EXPORTENTRY(void FAR *) BR_VMOperatingSystemLock(BR_PlatformHandle h);
  143. BR_EXPORTENTRY(BR_Boolean) BR_VMOperatingSystemUnlock(BR_PlatformHandle h);
  144. BR_EXPORTENTRY(unsigned long) BR_VMOperatingSystemGetSize(BR_PlatformHandle h);
  145. BR_EXPORTENTRY(BR_PlatformHandle) BR_VMMakeOSFromHandle(BR_VMHandle h);
  146. BR_EXPORTENTRY(BR_PlatformHandle) BR_VMMakeOSFromPointer(void FAR * p, unsigned long len);
  147. BR_EXPORTENTRY(BR_VMHandle) BR_VMMakeHandleFromOS(BR_PlatformHandle h);
  148. BR_EXPORTENTRY(void FAR *) BR_VMMakePointerFromOS(BR_PlatformHandle h);
  149.  
  150. #ifdef BR_BUILD_WIN
  151. BR_EXPORTENTRY(BR_Boolean) BR_VMDebugWalkCheckLocalPage(unsigned short Page);
  152. BR_EXPORTENTRY(void) BR_VMDebugDoCheckPage(unsigned short Page);
  153. BR_EXPORTENTRY(BR_Boolean) BR_VMDebugValidatePointer(void FAR * p);
  154. BR_EXPORTENTRY(BR_Boolean) BR_VMDebugValidateOSHandle(BR_PlatformHandle h);
  155. BR_EXPORTENTRY(BR_Boolean) BR_VMDebugValidateHandle(BR_VMHandle h);
  156. #endif
  157.  
  158. BR_EXPORTENTRY(void)   BR_VMMemorySet(void FAR *dest, unsigned char Value, 
  159.                                    unsigned short len);
  160. BR_EXPORTENTRY(void)   BR_VMMemoryMove(void FAR *dest, void FAR *src, unsigned short len);
  161. BR_EXPORTENTRY(short)  BR_VMMemoryCompare (void FAR *src1, void FAR *src2, unsigned short len);
  162. BR_EXPORTENTRY(unsigned short) BR_VMMemoryCRC(void FAR *src, 
  163.                                           unsigned short len, 
  164.                                           unsigned short init_crc);
  165.  
  166. #ifdef __cplusplus
  167.    }
  168. #endif
  169.  
  170. #endif
  171.  
  172.